package sharedClasses;
import java.io.Serializable;


public class Action implements Serializable
{
	private int[] origin;
	private int[] destination;
	
	private int actionID;
	public int ProceedingAction;
	public int FollowingAction;
	private int result; //should probably be an enum
	
	public Action(int[] originCoord, int[] destinationCoord, int result)
	{
		origin = new int[2];
		origin[0] = originCoord[0];
		origin[1] = originCoord[1];
		destination = new int[2];
		destination[0] = destinationCoord[0];
		destination[1] = destinationCoord[1];
		this.result = result;
	}
	
	public Action(int actionID, int originX, int originY, int destinationX, int destinationY, int result)
	{
		this.actionID = actionID;
		origin = new int[2];
		origin[0] = originX;
		origin[1] = originY;
		destination = new int[2];
		destination[0] = destinationX;
		destination[1] = destinationY;
		this.result = result;
	}
	
	public Action(int originX, int originY, int destinationX, int destinationY, int result)
	{
		actionID = 0;
		origin = new int[2];
		origin[0] = originX;
		origin[1] = originY;
		destination = new int[2];
		destination[0] = destinationX;
		destination[1] = destinationY;
		this.result = result;
	}
	
	public int getResult()
	{
		return result;
	}
	
	public void setResult(int r){
		this.result = r;
	}
	public int[] getOrigin()
	{
		int[] result = new int[2];
		result[0] = origin[0];
		result[1] = origin[1];
		return result;
	}
	
	public int[] getDestination()
	{
		int[] result = new int[2];
		result[0] = destination[0];
		result[1] = destination[1];
		return result;
	}
	
}
